package com.gali.juc;

import java.util.concurrent.CompletableFuture;

/**
 * @Auther: gali
 * @Date: 2022-08-18 21:02
 * @Description:
 */
public class CompletableFutureApi3 {
    public static void main(String[] args) {
        CompletableFuture.supplyAsync(()->{
            return 1;
        }).thenApply(f->f+1).thenApply(f->f+2).thenAccept(System.out::println);
    }
}
